document.addEventListener('DOMContentLoaded', function() {
    const toggles = document.querySelectorAll('.toggle');

    toggles.forEach(function(toggle) {
        toggle.addEventListener('click', function(event) {
            event.preventDefault();
            const nested = this.nextElementSibling;
            if (nested.classList.contains('nested')) {
                nested.parentElement.classList.toggle('active');
            }
        });
    });
});